
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Running a window</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="pbugp95.htm">Previous</A>&nbsp;&nbsp;<A HREF="pbugp97.htm" >Next</A>
<!-- End Header -->
<A NAME="X-REF298578429"></A><h1>Running a window</h1>
<A NAME="TI2599"></A><p>During development, you can test a window without running
the whole application. </p>
<A NAME="TI2600"></A><p>You can preview a window from the Window painter using the
Preview button on the PainterBar or run the window by clicking the
Preview button on the PowerBar. The PowerTip text for this button
is <FONT FACE="Courier New">Run/Preview Object</FONT>.
For information about previewing using the PainterBar button, see <A HREF="pbugp94.htm#CHDCEFHE">"Previewing a window"</A>.</p>
<A NAME="TI2601"></A><p>When you run the window using the PowerBar button, you must
save the window first. You can also trigger events and open other
windows because the window is functional.</p>
<A NAME="TI2602"></A><p><img src="images/proc.gif" width=17 height=17 border=0 align="bottom" alt="Steps"> To run a window:</p>
<ol><li class=fi><p>Click the Preview button in the PowerBar
(not the PainterBar).</p></li>
<li class=ds><p>In the Run/Preview dialog box, select
Windows as the Objects of Type.</p></li>
<li class=ds><p>Select the target that includes the window you
want to run.</p></li>
<li class=ds><p>Select the library that includes the window.</p></li>
<li class=ds><p>Select the window you want to run and click OK.</p><p>You must save your work before running a window. If you have
not saved your work, PowerBuilder prompts you to do so.</p><p>PowerBuilder runs the window.</p></li></ol>
<br><A NAME="TI2603"></A><p>You can trigger events, open other windows, connect to a database,
and so on when running a window. The window is fully functional.
It has access to global variables that you have defined for the
application and to built-in global variables, such as <ACRONYM title = "sequel c a" >SQLCA</ACRONYM>. The SystemError event
is not triggered if there is an error, because SystemError is an
Application object event.</p>
<A NAME="TI2604"></A><p><img src="images/proc.gif" width=17 height=17 border=0 align="bottom" alt="Steps"> To return to the Window painter:</p>
<ol><li class=fi><p>Do one of the following:<A NAME="TI2605"></A>
<ul>
<li class=fi>If
the Window has a control menu, select Close from the control menu or
click the Close button in the upper right corner of the window.</li>
<li class=ds>If the window is not visible, click PowerBuilder
on the task bar and then click the Terminate button
</li>
</ul>

                    .</p></li></ol>
<br>
